import re

import requests

class demo:
    def test_1(self):#爬虫基础
        str_a = 'http://www.woniuxy.com/'#构建URL
        r = requests.get(str_a)#发送get请求
        # print(r.text)
        # src = "/page/img/banner/allopen-home.jpg"
        pattern = "(src=\")(.+?)(.jpg)"
        for result in re.finditer(pattern,r.text):
            #print(result)
            # print(result.group(2))
            resu = result.group(2)
            src = "http://www.woniuxy.com%s.jpg"%resu
            # print(src)
        pa = "(http)(.+?)(.html)"
        for i in re.finditer(pa,r.text):
            print("http"+i.group(2)+".html")
demo().test_1()